Skip to main content

mediaFoundationReaderStreamSetCurrentMediaType

Type​

command

Summary​

Set the current media type of a reader stream. Platform:desktop

Syntax​

mediaFoundationReaderStreamSetCurrentMediaType <pFilePath>, <pStreamIndex>, <pMediaTypeID>

Description​

The reader must already be created with mediaFoundationCreateReader. The current media type is the type that samples will be read as. The command will return false if the reader is unable to decode the stream into the requested media type.

*Note

*:See the mediaFoundationTranscode documentation for a complete example of using this handler.

Parameters​

NameTypeDescription

pFilePath

string

The path to a media file

pStreamIndex

integer

An integer between 1 and the number of streams

pMediaTypeID

integer

A media type ID

Value​

NameTypeDescription

the result

boolean

Returns true if successful

command: mediaFoundationTranscode, mediaFoundationCreateReader

Compatibility and Support​

OS

windows

Thank you for your feedback!

Was this page helpful?